{include file="public/header" /}
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="js-ajax-form"  method="post" action="{:url('application/index')}">
        <div class="well form-inline margin-top-20" >
            所属用户:
            <input type="text" class="form-control" name="userName" style="width: 200px;"
                   value="{$params['userName']|default=''}" placeholder="请输入手机号或者邮箱地址">　
            应用名称:
            <input type="text" class="form-control" name="appName" style="width: 200px;"
                   value="{$params['appName']|default=''}" placeholder="请输入应用名称">　
            bundle ID:
            <input type="text" class="form-control" name="bundleID" style="width: 200px;"
                   value="{$params['bundleID']|default=''}" placeholder="请输入bundle ID">　
            <input type="submit" class="btn btn-primary" value="搜索"/>
            <a class="btn btn-danger" href="{:url('application/index')}">清空</a>
        </div>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>应用ID</th>
                <th>所属用户</th>
                <th>bundle ID</th>
                <th>应用名称</th>
                <th>应用大小</th>
                <th>最低兼容版本</th>
                <th>应用图标</th>
                <th>应用版本</th>
                <th>应用评分</th>
                <th>评分数量</th>
                <th>应用类型</th>
                <th>签名类型</th>
                <th>应用状态</th>
                <th>修改时间</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            {foreach name="list" item="vo"}
            <tr>
                <td>{$vo.app_id}</td>
                <td>{$vo.userName}</td>
                <td>{$vo.app_bundle_id}</td>
                <td>{$vo.app_name}</td>
                <td>{$vo.app_size}</td>
                <td>IOS{$vo.app_os_version}及以上</td>
                <td>
                    <img src="{$vo['app_icon']|default='/static/admin/images/default-thumbnail.png'}" width="50"/>
                </td>
                <td>{$vo.app_version}</td>
                <td>{$vo.app_rating}分</td>
                <td>{$vo.app_rating_num}个</td>
                <td>
                    {switch $vo.app_type }
                        {case 1}
                            IOS
                        {/case}
                        {case 2}
                            Android
                        {/case}
                        {case 3}
                            网页封装
                        {/case}
                    {/switch}
                </td>
                <td>
                    {switch $vo.app_sign_type }
                        {case 0}
                            发布应用
                        {/case}
                        {case 1}
                            企业签名
                        {/case}
                        {case 2}
                            超级签名
                        {/case}
                        {case 3}
                            网页封装
                        {/case}
                        {case 4}
                            安卓签名
                        {/case}
                    {/switch}
                </td>
                <td>
                    {switch $vo.app_status }
                        {case -1}
                            <span class="color-red">删除</span>
                        {/case}
                        {case 0}
                            <span class="color-green">审核中</span>
                        {/case}
                        {case 1}
                            <span class="color-green">审核通过</span>
                        {/case}
                        {case 2}
                            <span class="color-red">审核失败</span>
                        {/case}
                    {/switch}
                </td>
                <td>{$vo.app_modify_time}</td>
                <td>{$vo.app_create_time}</td>
                <td>
                    <a href="{:url('Application/detail', array('id' => $vo.app_id))}" >查看详情</a>
                </td>
            </tr>
            {/foreach}
        </table>
        {:$pagination}
    </form>
</div>
<script src="{$static}js/admin.js"></script>
</body>
</html>